package org.nuonuo.sdk.model.base;

import javax.validation.constraints.NotNull;

/**
 * @Version 1.0
 * @Author az
 * @Date 2024-04-01 11:43:09
 * @ClassName InvoiceDetail
 * @Description
 */
public class InvoiceDetail {

    /**
     * 商品名称（如invoiceLineProperty =1，则此商品行为折扣行，折扣行不允许多行折扣，折扣行必须紧邻被折扣行，商品名称必须与被折扣行一致）
     */
    @NotNull(message = "商品名称必填")
    private String goodsName;

    /**
     * 单价含税标志：0:不含税,1:含税
     */
    @NotNull(message = "单价含税标志必填")
    private String withTaxFlag;

    /**
     * 税率，注：1、纸票清单红票存在为null的情况；2、二手车发票税率为null或者0
     */
    @NotNull(message = "税率必填")
    private String taxRate;

    /**
     * 业务方明细自定义字段1，本应用只作保存
     */
//    @NotNull(message = "业务方明细自定义字段1必填")
    private String dField1;

    /**
     * 业务方明细自定义字段2，本应用只作保存
     */
//    @NotNull(message = "业务方明细自定义字段必填")
    private String dField2;

    /**
     * 业务方明细自定义字段3，本应用只作保存
     */
//    @NotNull(message = "业务方明细自定义字段3必填必填")
    private String dField3;

    /**
     * 业务方明细自定义字段4，本应用只作保存
     */
//    @NotNull(message = "业务方明细自定义字段4必填")
    private String dField4;

    /**
     * 业务方明细自定义字段5，本应用只作保存
     */
//    @NotNull(message = "业务方明细自定义字段5必填")
    private String dField5;

    /**
     * 商品编码（商品税收分类编码开发者自行填写）
     */
    private String goodsCode;
    /**
     * 自行编码（可不填）
     */
    private String selfCode;
    /**
     * 单价（精确到小数点后8位），当单价(price)为空时，数量(num)也必须为空；(price)为空时，含税金额(taxIncludedAmount)、不含税金额(taxExcludedAmount)、税额(tax)都不能为空
     */
    private String price;
    /**
     * 数量（精确到小数点后8位，开具红票时数量为负数）
     */
    private String num;
    /**
     * 单位
     */
    private String unit;
    /**
     * 规格型号
     */
    private String specType;
    /**
     * 税额（精确到小数点后2位），[不含税金额] * [税率] = [税额]；税额
     * 不含税金额（精确到小数点后2位）。红票为负。不含税金额、税额、含税金额任何一个不传时，会根据传入的单价，数量进行计算，可能和实际数值存在误差，建议都传入
     */
    private String taxExcludedAmount;
    /**
     * 含税金额（精确到小数点后2位），[不含税金额] + [税额] = [含税金额]，红票为负。不含税金额、税额、含税金额任何一个不传时，会根据传入的单价，数量进行计算，可能和实际数值存在误差，建议都传入
     */
    private String taxIncludedAmount;
    /**
     * <pre>
     * 发票行性质:
     *  0:正常行;
     *  1:折扣行;
     *  2:被扣行;
     * </pre>
     */
    private String invoiceLineProperty;

    /**
     * <pre>
     * 优惠政策标识：
     *  0:不使用;
     *  1:使用;
     *
     * 全电时：
     *  01：简易征收
     *  02：稀土产品
     *  03：免税
     *  04：不征税
     *  05：先征后退
     *  06：100%先征后退
     *  07：50%先征后退
     *  08：按3%简易征收
     *  09：按5%简易征收
     *  10：按5%简易征收减按1.5%计征
     *  11：即征即退30%
     *  12：即征即退50%
     *  13：即征即退70%
     *  14：即征即退100%
     *  15：超税负3%即征即退
     *  16：超税负8%即征即退
     *  17：超税负12%即征即退
     *  18：超税负6%即征即退
     * </pre>
     */
    private String favouredPolicyFlag;
    /**
     * 增值税特殊管理（优惠政策名称）,当favouredPolicyFlag为1时，此项必填 （数电票时为空）
     */
    private String favouredPolicyName;
    /**
     * 扣除额，差额征收时填写，目前只支持填写一项。 注意：当传0、空或字段不传时，都表示非差额征税；传0.00才表示差额征税：0.00 （数电票暂不支持）
     */
    private String deduction;
    /**
     * 零税率标识：空,非零税率
     * <pre>
     * 1,免税;
     * 2,不征税;
     * 3,普通零税率；
     * 1、当税率为：0%，且增值税特殊管理：为“免税”， 零税率标识：需传“1”
     * 2、当税率为：0%，且增值税特殊管理：为\"不征税\" 零税率标识：需传“2
     * 3、当税率为：0%，且增值税特殊管理：为空 零税率标识：需传“3” （数电票时为空）
     * </pre>
     */
    private String zeroRateFlag;

    private String tax;
    private String immediateTaxReturnType;


    /**
     * 商品名称
     */
    private String itemName;
    /**
     * 单位
     */
    private String itemUnit;
    /**
     * 单价
     */
    private String itemPrice;
    /**
     * 税率
     */
    private String itemTaxRate;
    /**
     * 数量
     */
    private String itemNum;
    /**
     * 金额（根据含税标志决定是含税金额还是不含税金额）
     */
    private String itemSumAmount;
    /**
     * 税额
     */
    private String itemTaxAmount;
    /**
     * 规格型号
     */
    private String itemSpec;
    /**
     * 商品编码
     */
    private String itemCode;
    /**
     * 自行编码
     */
    private String itemSelfCode;
    /**
     * <pre>
     * 含税标识:
     *  true:含税;
     *  false:不含税;
     * </pre>
     */
    private String isIncludeTax;

    /**
     * 商品税额
     */
    private String taxAmount;

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getWithTaxFlag() {
        return withTaxFlag;
    }

    public void setWithTaxFlag(String withTaxFlag) {
        this.withTaxFlag = withTaxFlag;
    }

    public String getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(String taxRate) {
        this.taxRate = taxRate;
    }

    public String getdField1() {
        return dField1;
    }

    public void setdField1(String dField1) {
        this.dField1 = dField1;
    }

    public String getdField2() {
        return dField2;
    }

    public void setdField2(String dField2) {
        this.dField2 = dField2;
    }

    public String getdField3() {
        return dField3;
    }

    public void setdField3(String dField3) {
        this.dField3 = dField3;
    }

    public String getdField4() {
        return dField4;
    }

    public void setdField4(String dField4) {
        this.dField4 = dField4;
    }

    public String getdField5() {
        return dField5;
    }

    public void setdField5(String dField5) {
        this.dField5 = dField5;
    }

    public String getGoodsCode() {
        return goodsCode;
    }

    public void setGoodsCode(String goodsCode) {
        this.goodsCode = goodsCode;
    }

    public String getSelfCode() {
        return selfCode;
    }

    public void setSelfCode(String selfCode) {
        this.selfCode = selfCode;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getSpecType() {
        return specType;
    }

    public void setSpecType(String specType) {
        this.specType = specType;
    }

    public String getTaxExcludedAmount() {
        return taxExcludedAmount;
    }

    public void setTaxExcludedAmount(String taxExcludedAmount) {
        this.taxExcludedAmount = taxExcludedAmount;
    }

    public String getTaxIncludedAmount() {
        return taxIncludedAmount;
    }

    public void setTaxIncludedAmount(String taxIncludedAmount) {
        this.taxIncludedAmount = taxIncludedAmount;
    }

    public String getInvoiceLineProperty() {
        return invoiceLineProperty;
    }

    public void setInvoiceLineProperty(String invoiceLineProperty) {
        this.invoiceLineProperty = invoiceLineProperty;
    }

    public String getFavouredPolicyFlag() {
        return favouredPolicyFlag;
    }

    public void setFavouredPolicyFlag(String favouredPolicyFlag) {
        this.favouredPolicyFlag = favouredPolicyFlag;
    }

    public String getFavouredPolicyName() {
        return favouredPolicyName;
    }

    public void setFavouredPolicyName(String favouredPolicyName) {
        this.favouredPolicyName = favouredPolicyName;
    }

    public String getDeduction() {
        return deduction;
    }

    public void setDeduction(String deduction) {
        this.deduction = deduction;
    }

    public String getZeroRateFlag() {
        return zeroRateFlag;
    }

    public void setZeroRateFlag(String zeroRateFlag) {
        this.zeroRateFlag = zeroRateFlag;
    }

    public String getTax() {
        return tax;
    }

    public void setTax(String tax) {
        this.tax = tax;
    }

    public String getImmediateTaxReturnType() {
        return immediateTaxReturnType;
    }

    public void setImmediateTaxReturnType(String immediateTaxReturnType) {
        this.immediateTaxReturnType = immediateTaxReturnType;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public String getItemUnit() {
        return itemUnit;
    }

    public void setItemUnit(String itemUnit) {
        this.itemUnit = itemUnit;
    }

    public String getItemPrice() {
        return itemPrice;
    }

    public void setItemPrice(String itemPrice) {
        this.itemPrice = itemPrice;
    }

    public String getItemTaxRate() {
        return itemTaxRate;
    }

    public void setItemTaxRate(String itemTaxRate) {
        this.itemTaxRate = itemTaxRate;
    }

    public String getItemNum() {
        return itemNum;
    }

    public void setItemNum(String itemNum) {
        this.itemNum = itemNum;
    }

    public String getItemSumAmount() {
        return itemSumAmount;
    }

    public void setItemSumAmount(String itemSumAmount) {
        this.itemSumAmount = itemSumAmount;
    }

    public String getItemTaxAmount() {
        return itemTaxAmount;
    }

    public void setItemTaxAmount(String itemTaxAmount) {
        this.itemTaxAmount = itemTaxAmount;
    }

    public String getItemSpec() {
        return itemSpec;
    }

    public void setItemSpec(String itemSpec) {
        this.itemSpec = itemSpec;
    }

    public String getItemCode() {
        return itemCode;
    }

    public void setItemCode(String itemCode) {
        this.itemCode = itemCode;
    }

    public String getItemSelfCode() {
        return itemSelfCode;
    }

    public void setItemSelfCode(String itemSelfCode) {
        this.itemSelfCode = itemSelfCode;
    }

    public String getIsIncludeTax() {
        return isIncludeTax;
    }

    public void setIsIncludeTax(String isIncludeTax) {
        this.isIncludeTax = isIncludeTax;
    }

    public String getTaxAmount() {
        return taxAmount;
    }

    public void setTaxAmount(String taxAmount) {
        this.taxAmount = taxAmount;
    }
}
